package com.wm.blog_admin.service;

import com.wm.blog_common.req.TFileQuery;
import com.wm.blog_common.result.Result;
import com.wm.picture_interface.feign.PictureFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;


/**
 * @author 半卷流年
 * @date 2020-5-9 16:19
 */
@Service
@Slf4j
public class UploadService {

    @Autowired
    private PictureFeignClient pictureFeignClient;

    public Result<String> uploadPicture(TFileQuery query,MultipartFile file){
        Result<String> result = pictureFeignClient.uploadFile(file);
        return Result.success(result.getData());
    }
}
